# @Author: LunaFlow
# @Date:   2018-09-30 15:48:18
# @Last Modified by:   LunaFlow
# @Last Modified time: 2018-09-30 15:55:57
# ubuntu
# 1.备份原来的数据源配置文件
cp /etc/apt/sources.list /etc/apt/sources.list_backup
# 2.编辑数据源配置文件
# 16.04
echo -e 'deb https://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse\ndeb https://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse\ndeb https://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse\ndeb https://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse' > /etc/apt/sources.list
# 3.更新配置
apt-get update
# 安装git
apt-get install -y git

# 安装 vim
apt-get install -y vim
apt-get install -y vim-gnome
# 配置 vim
echo -e "set ai\nset aw\nset ar\nset si\nset sc\nset sm\nset nu\nset cin\nset hls\n\nset go=0\nset bs=2\nset ls=2\nset so=3\nset mat=3\nset ts=4\nset sw=4 sta\nset mouse=a\nset shm=atI\nset list lcs=tab:\ \ \n\nautocmd BufEnter * cd %:p:h \n\nsyntax enable\nfiletype on\nfiletype plugin on\n\nfunc\! Run_cpp()\n exec \"w\!\"\n exec \"\!clear && g++ %<.cpp -o %< -g && ./%<\"\nendfunction\n\nmap <F9> :call Run_cpp()<cr>\n\nmap <space>h <C-w>h\nmap <space>j <C-w>j\nmap <space>k <C-w>k\nmap <space>l <C-w>l\n\nmap <space>[ <C-w>-\nmap <space>] <C-w>+\nmap <space>, <C-w><\nmap <space>. <C-w>>\n\nmap <space>w :wall<cr>\nmap <space>q :wqall<cr>\nmap <space><space>h :vsp<cr>\nmap <space><space>k :sp<cr>\n\n\nset rtp+=~/.vim/bundle/vundle/  \ncall vundle#rc()  \n\nPlugin 'gmarik/vundle'\nPlugin 'bling/vim-airline'\n\nlet g:airline_powerline_fonts = 1" > /home/.vimrc